Project (ysprobability)
CMake_Minimum_Required (VERSION 2.8)

Set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")

if(WIN32)
	Find_Package (DirectX11 REQUIRED)
else()
	# TODO
endif()

set(ADDITIONAL_INCLUDES )
set(ADDITIONAL_LIBRARIES )

if(WIN32)
	set(ADDITIONAL_INCLUDES ${DirectX11_INCLUDE_DIRS})
	set(ADDITIONAL_LIBRARIES ${DirectX11_LIBRARIES})
endif()

add_library (imgui STATIC
	imgui/imconfig.h
	imgui/imgui.cpp imgui/imgui.h
	imgui/imgui_demo.cpp
	imgui/imgui_draw.cpp
	imgui/imgui_internal.h
	imgui/imgui_tables.cpp
	imgui/imgui_widgets.cpp
	imgui/imstb_rectpack.h
	imgui/imstb_textedit.h
	imgui/imstb_truetype.h
)
Target_Include_Directories (imgui PUBLIC
)

add_library (implot STATIC
	implot/implot.cpp implot/implot.h
	implot/implot_demo.cpp
	implot/implot_internal.h
	implot/implot_items.cpp
)
Target_Include_Directories (implot PUBLIC
	imgui/
)
Target_Link_Libraries (implot PUBLIC
	imgui
)

Add_Executable (ysprobability
	imgui_impl/imgui_impl_dx11.cpp imgui_impl/imgui_impl_dx11.h
	imgui_impl/imgui_impl_win32.cpp imgui_impl/imgui_impl_win32.h
	imgui_impl/main_win32_dx11.cpp
	ImGuiApp.h
	GNUGetText.h GNUGetText.cpp
	MainApp.cpp
)
Target_Include_Directories (ysprobability PUBLIC
	/ imgui/ implot/
	${ADDITIONAL_INCLUDES}
)
Target_Link_Libraries (ysprobability
	imgui implot
	${ADDITIONAL_LIBRARIES}
)
